package flex.cc.uac.enums;

import java.util.Arrays;
import java.util.List;


public enum UacUserTypeEnum {

	/**
	 * 系统用户
	 */
	OPERATE("0", "系统用户"),;


	String key;

	String value;

	UacUserTypeEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}


	public String getKey() {
		return key;
	}


	public String getValue() {
		return value;
	}


	public static String getValue(String key) {
		for (UacUserTypeEnum ele : UacUserTypeEnum.values()) {
			if (key.equals(ele.getKey())) {
				return ele.getValue();
			}
		}
		return null;
	}


	public static UacUserTypeEnum getEnum(String key) {
		for (UacUserTypeEnum ele : UacUserTypeEnum.values()) {
			if (key.equals(ele.getKey())) {
				return ele;
			}
		}
		return null;
	}


	public static List<UacUserTypeEnum> getList() {
		return Arrays.asList(UacUserTypeEnum.values());
	}

}
